// 1.导入http模块
const http = require('http')
// 2.创建web服务器实例
const server = http.createServer()
// 3.给实例通过.on绑定request事件监听客户端的请求
server.on('request', function (req, res) {//参数后面才讲
    console.log('Someone visit our web server');
})
// 4.启动服务器
server.listen('8080', function () {
    console.log('sever runing at http://127.0.0.1:8080');
})
